1. Field of the Invention
This invention relates generally to computer peripheral devices, and more particularly to devices for processing data to detect synchronization patterns from compact disc media.
2. Description of the Related Art
Originally, compact disc read-only memory (CD-ROM) technology gained popularity as an audio technology. By providing superior digital sound quality, CD-ROM drives and discs have effectively displaced phonographs in the music industry. In recent years, CD-ROM technology has also become popular in computer industry as well for recording and reading a large amount of information or data.
Indeed, the CD-ROM drive has been adopted by the computer industry as a standard peripheral device. Prior Art FIG. 1A illustrates a computer system 100 including an external CD-ROM drive 104. The computer system 100 is coupled to the external CD-ROM drive 104 through a cable 106 conforming to standards such as IDE, SCSI, ATAPI, etc. By loading CD-ROM discs into the CD-ROM drive, a user of the computer system can conveniently access volumes of information for education, entertainment, games, music, etc.
Prior Art FIG. 1B illustrates a functional block diagram of a conventional CD-ROM drive peripheral device. An analog interface 110 receives a data stream from a CD-ROM medium (e.g., disc) for interfacing data to a digital signal processor (DSP) 112. The DSP 112 processes and transmits the data stream in serial mode to a CD-ROM decoder 116. An eight-to-fourteen modulation (EFM) decoder 114 also transmits data to the CD-ROM decoder 116.
The CD-ROM decoder 116 includes a synchronization (sync) detector and a header detector. Accordingly, the sync detector evaluates the data stream to detect sync patterns or marks as they are received. The header detector detects headers to determine whether the header contains a desired header that is associated with a desired sector minute-second-frame (MSF) address. In addition, the CD-ROM decoder 116 performs other decoding functions such as error correction code (ECC). Then, only the data from the CD-ROM decoder 116 goes into a host 100 (e.g., computer system) through an interface such as IDE or SCSI interface.
In CD-ROM media (e.g., CD-ROM disc), information or data is typically stored in units of sectors that are laid out in a continuous spiral from the center and extending through to the circumference of the CD-ROM disc. Prior Art FIG. 1C shows the sequential arrangement of exemplary sectors 11, 12, 13, 14, and 15 in a CD-ROM disc. Each sector contains 2,352 bytes including a synchronization (sync) word 122 of twelve bytes. Hence, two consecutive sync words 122 are separated by 2,340 bytes. The twelve bytes in the sync word 122 are generally assigned a sync pattern that include two 0's at the beginning and two 0's at the end of the twelve byte word, with all the remaining bits in between filled with 1's.
In order to access specific information in CD-ROM media, the CD-ROM drive must be able to identify the beginning of a sector. By providing a sync pattern that is exceptional to the rest of the data pattern, the CD-ROM drive can readily recognize the beginning of a sector. Immediately following the sync pattern is a header of four bytes. The header provides the MSF address of the sector. Following the four byte header are 2,048 bytes for storage of data and 288 bytes of auxiliary data for storing error detection code (EDC) and error correction code (ECC). It should be appreciated that the data can be audio data, in which case, the sector does not contain a header or auxiliary data.
Once the beginning of the sector has been identified, the CD-ROM drive can read the header following the sync pattern to determine whether the current sector is the desired sector. If the MSF address in the header of the current sector matches that of the desired sector, then the sector contains the desired data. Otherwise, the CD-ROM drive proceeds to identify the next sync word.
Reading from CD-ROM media typically involves the host issuing a command specifying the address of sectors to be read. In response, the CD-ROM drive obtains the track number where the sectors can be found from a Table of Contents on the CD-ROM media. Each track has a few thousand sectors. The CD-ROM drive reads data from the beginning of the track, searching specifically for sync patterns to identify the sectors. In this process, whenever a sync mark is detected, the associated header information indicating the MSF address of the sector is retrieved. If the address of the sector matches that of the desired sector, then the target sector has been found and desired data can be read. When the last desired sector has been read, the sync detection and reading processes terminate.
Detecting sync marks, however, has presented several problems in the past. For example, a sync pattern often cannot be detected as a sync mark due to noise, which may cause a 0 in the sync pattern to be read as 1 or vice versa. In addition, physical elements such as fingerprints, dust, etc. can cause an obstruction on CD-ROM media, which may lead to degradation or mis-reading of a sync pattern. When the sync mark associated with a sector cannot be detected in these situations, the reading head of a CD-ROM drive will move back to the beginning of the track again. In the alternative, when one or two sync marks are not detected in the middle of a sequence of several sectors, a sync mark is inserted based on the detected sync marks of other sectors.
Another problem in detecting sync marks involves so called "packet writing" in CD-Recordable (CD-R) media or discs, which is usually written only one time, in one or more sessions, and then can be read like typical CD-ROM discs. Specifically, information in packet writing is recorded in a sequence of sectors while the CD-R disc is rotating. This rotation generates an inherent gap in time between detecting the beginning of a sector and writing on the sector. That is, when the beginning of a sector is detected, the desired writing location on the CD-R disc will usually be passed-up, and therefore the writing location will be late by a number of bytes. Hence, when the sync pattern is written to mark the beginning of the sector, the sync mark is inherently recorded after a gap of a number of bytes. When the disc is read back, the sync mark may not be detected at all because the sync pattern is not at the proper place (i.e., at every 2353 bytes). In addition, the gap created in packet writing wastes disc space.
In the prior art, when a desired sync mark is not detected, the CD-ROM peripheral device typically restarts the search again by repositioning its read head in the original track position. The CD-ROM device then waits for the disc to rotate to the beginning of the track, and then restarts the reading to detect sync marks. Waiting for the entire revolution of the disc thus increases latency and degrades performance.
In view of the foregoing, what is needed is a device and method that can reliably detect sync patterns. What is further needed is a device and method that differentiates a genuine sync pattern from an erroneous one. In addition, what is needed is a device and method that can also detect missing sync pattern with a high degree of reliability.